package com.ai.module.order.domain.req;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author: MrHe
 * @create: 2024-02-04 23:18
 * @description: {
 * "mchid": "1900006XXX",
 * "out_trade_no": "1217752501201407033233368318",
 * "appid": "wxdace645e0bc2cXXX",
 * "description": "Image形象店-深圳腾大-QQ公仔",
 * "notify_url": "https://www.weixin.qq.com/wxpay/pay.php",
 * "amount": {
 * "total": 1,
 * "currency": "CNY"
 * },
 * "payer": {
 * "openid": "o4GgauInH_RCEdvrrNGrntXDuXXX"
 * }
 * }
 **/
@Data
public class WxPayBo implements Serializable {

    /**
     * 商户号
     */
    private String mchid="xx";

    /**
     * 商户订单号
     */
    private String out_trade_no;
    /**
     * 应用ID
     */
    private String appid="xx";

    /**
     * 商户号
     */
    private String description;

    /**
     * 通知地址
     */
    private String notify_url;

    /**
     * -订单金额
     */
    private Amount amount;

    /**
     * payer
     */
    private Payer payer;


    @Getter
    @Setter
    @AllArgsConstructor
    public static class Amount {
        int total;
        String currency = "CNY";
        public Amount(Integer money){
            this.total= money;
        }
    }

    @Getter
    @Setter
    @AllArgsConstructor
    public static class Payer {
        private String openid;

    }
}
